<style>
.spanlevel {
  font-size: 22px;
  font-weight: bold;
  color: black;
  padding: 10px;
}
.spanblod {
  font-weight: bold;
  color: black;
}
.checklevel {
  padding-right: 50px;
  zoom: 1.2;
}
.divtablemain {
  width: 100%;
  color: black;
  max-width: 1080px;
}
.tablemain {
  width: 100%;
  border-collapse: collapse;
}
.tablemain td {
  line-height: 20px;
  min-width: 80px;
  height: 50px;
  color: black;
  text-align: center;
  border: 1px solid black;
}
.tddivimg {
  text-align: center;
  width: 100%;
  margin-bottom: 10px;
  height: 400px;
  border: 1px dashed #cccccc;
}
.tdimg {
  max-width: 100%;
  max-height: 400px;
  cursor: pointer;
}

.table {
  width: 100%;
  border-collapse: collapse;
}
.table td {
  min-width: 80px;
  text-align: center;

  border: 1px solid #e8eaec;
}
.tableleft {
  text-align: left !important;
  padding: 10px;
  line-height: 24px;
}
.padding-10 {
  padding: 10px;
}
.imgmemo {
  width: 100%;
}
.imgperson {
  height: auto;
  width: 160px;
  margin: 5px;
  cursor: pointer;
}

.div-img {
  border: 1px solid #e8eaec;
  margin-right: 10px;
  cursor: pointer;
}
.signimg {
  width: 100px;
  border: 0;
}
.spanrst {
  font-size: 20px;
}
.tableremark {
  font-family: 楷体;
}
.ivu-checkbox-disabled.ivu-checkbox-checked .ivu-checkbox-inner {
  border-color: #2d8cf0;
  background-color: #2d8cf0;
  color: #ffffff;
}
.ivu-checkbox-disabled .ivu-checkbox-inner {
  border-color: #dcdee2;
  background-color: #fff;
}
</style>
<template>
  <div>
    <Card :title="'核查报告-' + name">
      <a
        href="/static/print/printdibaoreport2.html"
        target="_blank"
        style="margin-right: 10px"
        slot="extra"
        >模板</a
      >

      <a href="#" slot="extra" @click.prevent="PrintReport(2)">打印</a>
      <Row>
        <Center style="color: black">
          <h2>
            城乡低保家庭入户核查明细表（一）
            <span   style="font-size: 14px"
              >核查人：{{ dbinfo.sys_CreaterName }}</span
            >
          </h2>
        </Center>
      </Row>
      <br />
      <Row>
        <Center>
          <div class="divtablemain">
            <Row>
              <Col span="4">乡镇：{{ dbinfo.Town }}</Col>
              <Col span="4">社区：{{ dbinfo.Community }}</Col>
              <Col span="8">详细地址：{{ dbinfo.Address }}</Col>
              <Col span="8">联系方式：{{ dbinfo.Phone }}</Col>
            </Row>
            <table border="1" cellspacing="0" cellpadding="0" class="tablemain">
              <tr>
                <td style="width: 130px" rowspan="2">
                  户主
                  <br />姓名
                </td>
                <td rowspan="2">
                  {{ dbinfo.Name }}{{ dbperson.IsNew == 1 ? "（新）" : "" }}
                </td>

                <td rowspan="2">
                  家庭
                  <br />人口
                </td>
                <td rowspan="2">{{ dbinfo.FamilyCount }}</td>
                <td rowspan="2">
                  是否
                  <br />建档 <br />立卡
                </td>
                <td rowspan="2">{{ dbinfo.IsRecord == 1 ? "是" : "否" }}</td>
                <td>残疾类型</td>
                <td colspan="3">
                  <Checkbox
                    disabled="true"
                    v-model="dbinfo.HandicapType"
                    :true-value="1"
                    >精神</Checkbox
                  >
                  <Checkbox
                    disabled="true"
                    v-model="dbinfo.HandicapType"
                    :true-value="2"
                    >智力</Checkbox
                  >
                  <Checkbox
                    disabled="true"
                    v-model="dbinfo.HandicapType"
                    :true-value="3"
                    >言语</Checkbox
                  >
                  <Checkbox
                    disabled="true"
                    v-model="dbinfo.HandicapType"
                    :true-value="4"
                    >肢体</Checkbox
                  >
                  <Checkbox
                    disabled="true"
                    v-model="dbinfo.HandicapType"
                    :true-value="5"
                    >视力</Checkbox
                  >
                  <Checkbox
                    disabled="true"
                    v-model="dbinfo.HandicapType"
                    :true-value="9"
                    >其他</Checkbox
                  >
                </td>
                <td>
                  <span v-if="dbinfo.HandicapType > 0"
                    >{{ dbinfo.HandicapLevel }}级</span
                  >
                </td>
              </tr>
              <tr>
                <td>其他健康状况</td>
                <td colspan="4">{{ dbinfo.Condition }}</td>
              </tr>
              <tr>
                <td :rowspan="family0.length + 2">
                  家庭成
                  <br />员信息
                </td>
                <td>姓名</td>
                <td>
                  与户主
                  <br />关系
                </td>
                <td>
                  是否为
                  <br />保障对象
                </td>
                <td>年龄</td>
                <td colspan="2">身份证号</td>
                <td>健康状况</td>
                <td>职业状况</td>
                <td>职业明细</td>
                <td>
                  年收入
                  <br />（元）
                </td>
              </tr>
              <tr :key="item.Gid" v-for="item in family0">
                <td>{{ item.Name }}</td>
                <td>{{ item.Relation }}</td>
                <td>{{ item.IsBaozhang == 1 ? "是" : "否" }}</td>
                <td>{{ item.Age }}</td>
                <td colspan="2">{{ item.IdCardNo }}</td>
                <td>{{ item.HealthDesc }}</td>
                <td>{{ item.JobDesc }}</td>
                <td>{{ item.JobDetail }}</td>
                <td>{{ item.InCome }}</td>
              </tr>
              <tr>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td colspan="2"></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
              </tr>
              <tr v-if="family1.length == 0">
                <td>
                  赡抚
                  <br />（扶）养 <br />义务人 <br />员信息
                </td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td colspan="2"></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
              </tr>

              <tr v-else :key="item.Gid" v-for="(item, index) in family1">
                <td v-if="index == 0" :rowspan="family1.length + 2">
                  赡抚
                  <br />（扶）养 <br />义务人 <br />信息
                </td>
                <td>{{ item.Name }}</td>
                <td>{{ item.Relation }}</td>
                <td>{{ item.IsBaozhang == 1 ? "是" : "否" }}</td>
                <td>{{ item.Age }}</td>
                <td colspan="2">{{ item.IdCardNo }}</td>
                <td>{{ item.HealthDesc }}</td>
                <td>{{ item.JobDesc }}</td>
                <td>{{ item.JobDetail }}</td>
                <td>{{ item.InCome }}</td>
              </tr>
            </table>
            <Row
              type="flex"
              justify="center"
              align="middle"
              class="code-row-bg"
            >
              <Col span="24" class="tableleft tableremark"
                >注：法定赡养人是指晚辈亲属对长辈亲属的照顾义务的个人；抚养人是指长辈对晚辈亲属的照顾义务的个人；扶养义务人是指同辈亲属之间的供养义务的个人，比如夫妻、姊妹等。</Col
              >
            </Row>
          </div>
        </Center>
      </Row>
    </Card>
    <br />

    <Card>
      <Row>
        <Center style="color: black">
          <h2>城乡低保家庭入户核查明细表（二）</h2>
        </Center>
      </Row>
      <Center>
        <div class="divtablemain">
          <table border="1" cellspacing="0" cellpadding="0" class="tablemain">
            <tr>
              <td style="width: 130px" rowspan="5">
                家庭基
                <br />本情况
              </td>
              <td>住房情况</td>
              <td colspan="5" class="tableleft">
                <Checkbox
                  disabled="true"
                  v-model="dbinfo.HousingType"
                  :true-value="1"
                  >租房居住</Checkbox
                >
                <Checkbox
                  disabled="true"
                  v-model="dbinfo.HousingType"
                  :true-value="2"
                  >与父母子女同住</Checkbox
                >
                <Checkbox
                  disabled="true"
                  v-model="dbinfo.HousingType"
                  :true-value="3"
                  >与配偶居住</Checkbox
                >
                <Checkbox
                  disabled="true"
                  v-model="dbinfo.HousingType"
                  :true-value="4"
                  >独居</Checkbox
                >
                <Checkbox
                  disabled="true"
                  v-model="dbinfo.HousingType"
                  :true-value="9"
                  >其他</Checkbox
                >
                {{ dbinfo.HousingDesc }}
              </td>
            </tr>
            <tr>
              <td>房屋情况</td>
              <td colspan="5" class="tableleft">
                <div style="margin-bottom: 5px">
                  <Checkbox
                    disabled="true"
                    v-model="dbinfo.HouseType"
                    :true-value="0"
                    >自建</Checkbox
                  >
                  <Checkbox
                    disabled="true"
                    v-model="dbinfo.HouseType"
                    :true-value="1"
                    >还建</Checkbox
                  >
                  <Checkbox
                    disabled="true"
                    v-model="dbinfo.HouseType"
                    :true-value="2"
                    >商品房</Checkbox
                  >
                  <Checkbox
                    disabled="true"
                    v-model="dbinfo.HouseType"
                    :true-value="9"
                    >其他</Checkbox
                  >
                  ; 套数 {{ dbinfo.HouseCount }} 套或间；面积
                  {{ dbinfo.HouseArea }} ㎡
                </div>

                <div>
                  房屋结构：{{ dbinfo.HouseDesc }},装修情况：
                  <Checkbox
                    disabled="true"
                    v-model="dbinfo.HouseDecorate"
                    :true-value="2"
                    >精装</Checkbox
                  >
                  <Checkbox
                    disabled="true"
                    v-model="dbinfo.HouseDecorate"
                    :true-value="1"
                    >简装</Checkbox
                  >
                  <Checkbox
                    disabled="true"
                    v-model="dbinfo.HouseDecorate"
                    :true-value="0"
                    >无装修</Checkbox
                  >
                </div>
              </td>
            </tr>
            <tr>
              <td rowspan="2">
                生活消费
                <br />品配备
              </td>
              <td colspan="5" class="tableleft">
                大型农机具：
                <Checkbox
                  disabled="true"
                  v-model="dbinfo.HasFarmMachine"
                  :true-value="1"
                  >有</Checkbox
                >
                <Checkbox
                  disabled="true"
                  v-model="dbinfo.HasFarmMachine"
                  :true-value="0"
                  >无</Checkbox
                >; 车辆（含农用车）：
                <Checkbox
                  disabled="true"
                  v-model="dbinfo.HasCar"
                  :true-value="1"
                  >有</Checkbox
                >
                <Checkbox
                  disabled="true"
                  v-model="dbinfo.HasCar"
                  :true-value="0"
                  >无</Checkbox
                >;
              </td>
            </tr>
            <tr>
              <td colspan="5" class="tableleft">
                大宗家用电器：{{ dbinfo.Appliance }}
              </td>
            </tr>
            <tr>
              <td>耕地面积</td>
              <td colspan="5" class="tableleft">
                共：{{ dbinfo.LandArea }} 亩，其中粮地
                {{ dbinfo.LiangDiArea }} 亩、承包地
                {{ dbinfo.ChengBaoDiArea }} 亩、租赁土地
                {{ dbinfo.ZulinArea }} 亩、菜园地 {{ dbinfo.CaiYuanDiArea }} 亩
              </td>
            </tr>
            <tr v-if="income0.length == 0">
              <td>
                土地经
                <br />营收入
              </td>
              <td colspan="2"></td>
              <td></td>
              <td colspan="3"></td>
            </tr>
            <tr :key="item.Gid" v-for="(item, index) in income0">
              <td v-if="index == 0" :rowspan="income0.length">
                土地经
                <br />营收入
              </td>
              <td colspan="2">种植{{ item.Name }}收入</td>
              <td>{{ item.Amount }}元</td>
              <td class="tableleft" colspan="3">
                <span v-if="item.MuNum"
                  >{{ item.MuNum }}亩，亩产{{ item.MuUnit }}公斤，单价：{{
                    item.FinalPrice
                  }}元/公斤,支出：{{ item.MuPay }}元。</span
                >
                <span v-else>
                  {{ item.Num }}{{ item.Unit }} × {{ item.FinalPrice }}元 =
                  {{ item.Amount }}元
                </span>
              </td>
            </tr>
            <tr v-if="income1.length == 0">
              <td>
                养殖
                <br />收入
              </td>
              <td colspan="2">{{ dbinfo.XumuDesc }}</td>
              <td>{{ dbinfo.InComeXumu }}元</td>
              <td colspan="3"></td>
            </tr>
            <tr :key="item.Gid" v-for="(item, index) in income1">
              <td v-if="index == 0" :rowspan="income1.length">
                养殖
                <br />收入
              </td>
              <td colspan="2">{{ item.Name }}收入</td>
              <td>{{ item.Amount }}元</td>
              <td class="tableleft" colspan="3">
                {{ item.Num }}{{ item.Unit }} × {{ item.FinalPrice }}元 =
                {{ item.Amount }}元
              </td>
            </tr>
            <tr>
              <td rowspan="2">
                工资性
                <br />收入
              </td>
              <td colspan="2">临时劳务年收入</td>
              <td>{{ dbinfo.InComeTempWork }}元</td>
              <td class="tableleft" colspan="3">{{ dbinfo.TempWorkDesc }}</td>
            </tr>
            <tr>
              <td colspan="2">长期务工（工作）年收入</td>
              <td>{{ dbinfo.InComeLongWork }}元</td>
              <td class="tableleft" colspan="3">{{ dbinfo.LongWorkDesc }}</td>
            </tr>
            <tr>
              <td rowspan="7">
                转移性
                <br />收入
              </td>
              <td colspan="2">养老、失业保险、离退休金</td>
              <td>{{ dbinfo.InComeBaoxian }}元</td>
              <td class="tableleft" colspan="3">{{ dbinfo.BaoxianDesc }}</td>
            </tr>
            <tr>
              <td colspan="2">遗属补助</td>
              <td>{{ dbinfo.InComeYizhu }}元</td>
              <td class="tableleft" colspan="3">{{ dbinfo.YizhuDesc }}</td>
            </tr>
            <tr>
              <td colspan="2">赡养抚养收入</td>
              <td>{{ dbinfo.InComeShanYang }}元</td>
              <td class="tableleft" colspan="3">{{ dbinfo.ShanYangDesc }}</td>
            </tr>
            <tr>
              <td colspan="2">村居福利性收入</td>
              <td>{{ dbinfo.InComeCunju }}元</td>
              <td class="tableleft" colspan="3">{{ dbinfo.CunjuDesc }}</td>
            </tr>
            <tr>
              <td colspan="2">亲友赠送</td>
              <td>{{ dbinfo.InComeZengsong }}元</td>
              <td class="tableleft" colspan="3">{{ dbinfo.ZengsongDesc }}</td>
            </tr>
            <tr>
              <td colspan="2">库区补助</td>
              <td>{{ dbinfo.InComeKuqu }}元</td>
              <td class="tableleft" colspan="3">{{ dbinfo.KuquDesc }}</td>
            </tr>
            <tr>
              <td colspan="2">老年补贴、抚恤金等</td>
              <td>{{ dbinfo.InComeBuTie }}元</td>
              <td class="tableleft" colspan="3">{{ dbinfo.BuTieDesc }}</td>
            </tr>
            <tr>
              <td rowspan="2">
                家庭经营
                <br />服务收入
              </td>
              <td colspan="2">加工、手工业、采集捕猎</td>
              <td>{{ dbinfo.InComeShougong }}元</td>
              <td class="tableleft" colspan="3">{{ dbinfo.ShougongDesc }}</td>
            </tr>
            <tr>
              <td colspan="2">批发贸易餐饮运输服务等</td>
              <td>{{ dbinfo.InComePiFa }}元</td>
              <td class="tableleft" colspan="3">{{ dbinfo.PiFaDesc }}</td>
            </tr>
            <tr>
              <td rowspan="3">
                财产性
                <br />收入
              </td>
              <td colspan="2">出租财产和无形资产收入</td>
              <td>{{ dbinfo.InComeChuzu }}元</td>
              <td class="tableleft" colspan="3">{{ dbinfo.ChuzuDesc }}</td>
            </tr>
            <tr>
              <td colspan="2">土地流转或转租承包土地</td>
              <td>{{ dbinfo.InComeLiuzhuan }}元</td>
              <td class="tableleft" colspan="3">{{ dbinfo.LiuzhuanDesc }}</td>
            </tr>
            <tr>
              <td colspan="2">分红股息利息等其它收入</td>
              <td>{{ dbinfo.InComeFenhong }}元</td>
              <td class="tableleft" colspan="3">{{ dbinfo.FenhongDesc }}</td>
            </tr>
            <tr>
              <td>
                其他
                <br />收入
              </td>
              <td colspan="2">{{ dbinfo.InComeOtherDesc }}</td>
              <td>{{ dbinfo.InComeOther }}元</td>
              <td class="tableleft" colspan="3"></td>
            </tr>
            <tr>
              <td>家庭支出</td>
              <td colspan="6">{{ dbinfo.FamilyPay }} {{ dbinfo.PayDesc }}</td>
            </tr>
            <tr>
              <td colspan="2">家庭年总收入</td>
              <td>{{ dbinfo.InComeAll }}元</td>
              <td>不计算的收入</td>
              <td>{{ dbinfo.InComeNoCalc }}</td>
              <td>家庭年人均收入</td>
              <td>{{ dbinfo.InComeAvg }}</td>
            </tr>
          </table>
        </div>
      </Center>
      <br />
    </Card>
    <br />
    <Card>
      <Row>
        <Center style="color: black">
          <h2>因病、因残等致贫证明材料</h2>
        </Center>
      </Row>
      <Center>
        <div class="divtablemain">
          <table border="1" cellspacing="0" cellpadding="0" class="tablemain">
            <tr>
              <td style="width: 130px">致贫原因</td>
              <td colspan="3" class="tableleft">
                <Checkbox
                  disabled="true"
                  v-model="dbinfo.PoorReason"
                  :true-value="0"
                  >因病致贫</Checkbox
                >
                <Checkbox
                  disabled="true"
                  v-model="dbinfo.PoorReason"
                  :true-value="1"
                  >因残致贫</Checkbox
                >
                <Checkbox
                  disabled="true"
                  v-model="dbinfo.PoorReason"
                  :true-value="2"
                  >缺乏劳动力</Checkbox
                >
                <Checkbox
                  disabled="true"
                  v-model="dbinfo.PoorReason"
                  :true-value="9"
                  >其他</Checkbox
                >
              </td>
            </tr>
            <tr>
              <td style="width: 130px">情况描述</td>
              <td colspan="3" class="tableleft">{{ dbinfo.PoorDesc }}</td>
            </tr>
            <tr>
              <td style="width: 130px">备注</td>
              <td colspan="3" class="tableleft">{{ dbinfo.Remark }}</td>
            </tr>
            <tr>
              <td style="width: 130px">自动生成结论</td>
              <td colspan="3" class="tableleft">
                <div>
                  &nbsp;&nbsp;&nbsp;&nbsp;该申请人共同家庭成员有
                  {{ dbinfo.FamilyCount }} 人，分别为：
                  {{ dbinfo.Name }}
                  <span v-if="family0.length > 0">、</span>
                  <span v-for="(item, index) in family0" :key="item.Id">
                    {{ item.Name }}
                    <span v-if="index < family0.length - 1">、</span>
                  </span>
                  。
                </div>
                <div>
                  &nbsp;&nbsp;&nbsp;&nbsp;该家庭年度总收入为：
                  {{ dbinfo.InComeAll }}元， 不计算收入为{{
                    dbinfo.InComeNoCalc
                  }}元，家庭总支出为{{ dbinfo.FamilyPay }}元，家庭人均收入为
                  {{ dbinfo.InComeAvg }}元， 在家庭总收入中，
                  <span v-for="(item, index) in income0" :key="item.Id"
                    >种植{{ item.Name }}为{{ item.Amount }}元，</span
                  >
                  <span v-if="dbinfo.InComeXumu > 0"
                    >养殖{{ dbinfo.XumuDesc }}{{ dbinfo.InComeXumu }}元，</span
                  >
                  <span v-if="dbinfo.InComeTempWork > 0"
                    >临时劳务收入为{{ dbinfo.InComeTempWork }}元，</span
                  >
                  <span v-if="dbinfo.InComeLongWork > 0"
                    >长期务工（工作）年入为{{ dbinfo.InComeLongWork }}元，</span
                  >
                  <span v-if="dbinfo.InComeBaoxian > 0"
                    >养老、失业保险、离退休金为{{
                      dbinfo.InComeBaoxian
                    }}元，</span
                  >
                  <span v-if="dbinfo.InComeYizhu > 0"
                    >遗属补助为{{ dbinfo.InComeYizhu }}元，</span
                  >
                  <span v-if="dbinfo.InComeShanYang > 0"
                    >赡养抚养收入为{{ dbinfo.InComeShanYang }}元，</span
                  >
                  <span v-if="dbinfo.InComeZengsong > 0"
                    >亲友赠送为{{ dbinfo.InComeZengsong }}元，</span
                  >
                  <span v-if="dbinfo.InComeKuqu > 0"
                    >库区补助为{{ dbinfo.InComeKuqu }}元，</span
                  >
                  <span v-if="dbinfo.InComeCunju > 0"
                    >村居福利性收入为{{ dbinfo.InComeCunju }}元，</span
                  >
                  <span v-if="dbinfo.InComeBuTie > 0"
                    >老年补贴、抚恤金等为{{ dbinfo.InComeBuTie }}元，</span
                  >
                  <span v-if="dbinfo.InComeShougong > 0"
                    >加工、手工业、采集捕猎收入为{{
                      dbinfo.InComeShougong
                    }}元，</span
                  >
                  <span v-if="dbinfo.InComePiFa > 0"
                    >批零贸易餐饮运输服务等收入为{{
                      dbinfo.InComePiFa
                    }}元，</span
                  >
                  <span v-if="dbinfo.InComeChuzu > 0"
                    >出租财产和无形资产年收入为{{
                      dbinfo.InComeChuzu
                    }}元，</span
                  >
                  <span v-if="dbinfo.InComeLiuzhuan > 0"
                    >土地流转或转租承包土地收入为{{
                      dbinfo.InComeLiuzhuan
                    }}元，</span
                  >
                  <span v-if="dbinfo.InComeFenhong > 0"
                    >分红股息利息等其它收入为{{
                      dbinfo.InComeFenhong
                    }}元，</span
                  >
                  <span v-if="dbinfo.InComeOther > 0"
                    >其他收入为{{ dbinfo.InComeOther }}元，</span
                  >
                  合计{{ dbinfo.InComeAll }} 元。
                </div>
              </td>
            </tr>

            <tr>
              <td style="width: 130px">核查结论</td>
              <td colspan="3" class="tableleft">
                <div class="home2content">
                   {{dbinfo.FinalResult}}
                </div>
              </td>
            </tr>
            <tr>
              <td style="width: 130px">符合人员</td>
              <td colspan="3" class="tableleft">
                <div class="home2content">
                  {{dbinfo.FinalResult2}}
                </div>
              </td>
            </tr>
            <tr>
              <td style="width: 130px">证明材料</td>
              <td colspan="3" class="tableleft">
                <Row :gutter="16">
                  <viewer :images="imgzhengming">
                    <Col :key="item.Gid" v-for="item in imgzhengming" span="12">
                       
                      <div class="tddivimg">
                        <img
                          class="tdimg"
                          :src="
                            item.ImgUrl +
                            '?x-oss-process=image/rotate,' +
                            item.Rotate
                          "
                        />
                      </div>
                    </Col>
                  </viewer>
                </Row>
              </td>
            </tr>
            <tr>
              <td style="width: 130px">
                家庭成员身份证
                <br />户口簿复印件
              </td>
              <td colspan="3" class="tableleft">
                <Row :gutter="16">
                  <viewer :images="imgshenfenzheng">
                    <Col
                      :key="item.Gid"
                      v-for="item in imgshenfenzheng"
                      span="12"
                    >
                      
                      <div class="tddivimg">
                        <img
                          class="tdimg"
                          :src="
                            item.ImgUrl +
                            '?x-oss-process=image/rotate,' +
                            item.Rotate
                          "
                        />
                      </div>
                    </Col>
                  </viewer>
                </Row>
              </td>
            </tr>
            <tr>
              <td style="width: 130px">入户核查情况</td>
              <td colspan="3" class="tableleft">
                <Row :gutter="16">
                  <viewer :images="imgruhu">
                    <Col :key="item.Gid" v-for="item in imgruhu" span="12">
                       
                      <div class="tddivimg">
                        <img
                          class="tdimg"
                          :src="
                            item.ImgUrl +
                            '?x-oss-process=image/rotate,' +
                            item.Rotate
                          "
                        />
                      </div>
                    </Col>
                  </viewer>
                </Row>
              </td>
            </tr>
            <tr>
              <td style="width: 130px">备注图片</td>
              <td colspan="3" class="tableleft">
                <Row :gutter="16">
                  <viewer :images="imgremark">
                    <Col :key="item.Gid" v-for="item in imgremark" span="12">
                       
                      <div class="tddivimg">
                        <img
                          class="tdimg"
                          :src="
                            item.ImgUrl +
                            '?x-oss-process=image/rotate,' +
                            item.Rotate
                          "
                        />
                      </div>
                    </Col>
                  </viewer>
                </Row>
              </td>
            </tr>
            <tr>
              <td style="width: 130px">视频</td>
              <td colspan="3" class="tableleft">
                <Row :gutter="16">
                  <Col :key="item.Gid" v-for="item in video" span="12">
                    <div class="tddivimg">
                      <video controls :src="item.ImgUrl" class="tdimg">
                        您的浏览器不支持播放视频
                      </video>
                    </div>
                  </Col>
                </Row>
              </td>
            </tr>
            <tr>
              <td style="width: 130px">核查录音</td>
              <td colspan="3" class="tableleft">
                <ButtonGroup
                  style="margin-right: 10px; margin-bottom: 10px"
                  v-for="item in players"
                  :key="item.url"
                >
                  <Button
                    @click="item.toggle()"
                    type="success"
                    icon="md-headset"
                    >{{ item.isPlaying ? "停止" : "播放" }}</Button
                  >
                  <Button
                    @click="downloadSound(item.url)"
                    type="primary"
                    icon="ios-cloud-download"
                    >下载</Button
                  >
                </ButtonGroup>
              </td>
            </tr>

            <tr>
              <td colspan="4" class="tableleft tableremark">
                致贫原因:
                因病的写明病情，花费金额，有残疾证的写明残疾类型、残疾等级，家庭出现变故的写明原因和其他能证明贫困的原因。残疾人的需出具残疾证复印件；患有重大疾病的出具诊断证明扫描件、病历及医疗保险费用结算单据等。
              </td>
            </tr>
          </table>
          <div style="height:500px"></div>
        </div>
      </Center>
      <br />
    </Card>
    <Modal :mask-closable="false" v-model="modal2" title="查看图片" footer-hide>
      <div>
        <img :src="tmpimg" style="width: 100%" />
      </div>
    </Modal>
    <iframe
      id="iframe-print"
      frameborder="0"
      style="display: none"
      scrolling="auto"
      :src="printSrc"
    ></iframe>
    <iframe
      id="iframe-print2"
      frameborder="0"
      style="display: none"
      scrolling="auto"
      :src="printSrc2"
    ></iframe>
  </div>
</template>
<script>
import "viewerjs/dist/viewer.css";
import Viewer from "v-viewer/src/component.vue";
import { printUrl } from "@/libs/util";
import { Modal } from "view-design";
import {
  GetDBPersonById, 
} from "@/api/dbdata";
import dayjs from "dayjs";
export default {
  name: "db_info_saved",
  data() {
    return {
      LoadingResult: false,
      LoadingResult2: false,
      currentPlay: "",
      player: null,
      printSrc: printUrl + "printdibaoreport.html",
      printSrc2: printUrl + "printdibaoreport2.html",
      modal2: false,
      tmpimg: "",
      firstlevel: [],
      lelelmemo: [],
      finallevel: [],
      dbperson: {},
      dbinfo: {},
      img1: "",
      img2: "",
      players: [],
      sounds: [],
    };
  },
  components: {
    Viewer,
  },
  props: {
    id: {
      type: String,
      required: true,
    },
    name: {
      type: String,
    },
  },
  computed: {
    family0() {
      return this.dbinfo.familyperson.filter((x) => x.Type == 0);
    },
    family1() {
      return this.dbinfo.familyperson.filter((x) => x.Type == 1);
    },
    income0() {
      return this.dbinfo.dbincome.filter((x) => x.Type == 0);
    },
    income1() {
      return this.dbinfo.dbincome.filter((x) => x.Type == 1);
    },
    imgzhengming() {
      return this.dbinfo.dbimg.filter((x) => x.Type == 0);
    },
    imgshenfenzheng() {
      return this.dbinfo.dbimg.filter((x) => x.Type == 1);
    },
    imgruhu() {
      return this.dbinfo.dbimg.filter((x) => x.Type == 2);
    },
    imgremark() {
      return this.dbinfo.dbimg.filter((x) => x.Type == 3);
    },
    video() {
      return this.dbinfo.dbimg.filter((x) => x.Type == 9);
    },
  },
  methods: {
    alert(aa) {
      alert(aa);
    },
    GetDBPersonById() {
      GetDBPersonById(this.id).then((res) => {
        const data = res.data;
        if (data.Type == 1) {
          this.dbperson = data.Data;
          try {
            this.dbperson.Birthday = dayjs(this.dbperson.Birthday).format(
              "YYYY年MM月DD日"
            );
          } catch (ex) {}
          if (this.dbperson.DBInfo != null) {
            this.dbinfo = this.dbperson.DBInfo;
            this.sounds = this.dbinfo.dbimg.filter(
              (x) => x.Type == 7 || x.Type == 8
            );
            this.sounds.forEach((e, i) => { 
              this.$set(
                this.players,
                i,
                new AmrPlayer(
                  e.ImgUrl,
                  function () {},
                  function (e) {}
                )
              );
            });
          }
        } else {
          this.$Modal.error({ title: "提示", content: data.Message });
        }
      });
    },
    UpdateImgRotate(item, rotate) {
      var reqData = {
        gid: item.Gid,
        rotate: rotate,
      };
      UpdateImgRotate(reqData).then((res) => {
        const data = res.data;
        if (data.Type == 1) {
          item.Rotate = data.Data.Rotate;
        } else {
          this.$Modal.error({ title: "提示", content: data.Message });
        }
      });
    },
    
    showImg(item) {
      this.tmpimg = item;
      this.modal2 = true;
    },
    PrintReport(type) {
      if (type == 1) {
        document
          .getElementById("iframe-print")
          .contentWindow.printData(this.dbperson, this.dbinfo);
      } else {
        document
          .getElementById("iframe-print2")
          .contentWindow.printData(this.dbperson, this.dbinfo);
      }
    },
    isHandicapType(type) {
      return this.dbinfo.HandicapType == type;
    },

    playSound(gid, url) {
      let vm = this;
      if (vm.currentPlay == gid) {
        vm.player.pause();
        vm.player = null;
        vm.currentPlay = "";
      } else {
        vm.player = new AmrPlayer(
          url,
          function () {
            vm.player.play();
            vm.currentPlay = gid;
          },
          function (e) {}
        );
      }
    },
    downloadSound(url) {
      window.open(url);
    },
  },
  created() {},

  mounted() {
    this.GetDBPersonById();
  },
};
</script>
